
{ Benchmarks for floating point and integer speed of Image SXM    2 Jul 2000	}

macro 'Benchmark';
var
  MessageStr: string;
  StartTicks, Time: real;
  i: integer;

begin
		MessageStr := '';
  SetBackground(128);
  SetForeground(255);
  SetNewSize(1024, 1024);
  MakeNewWindow('Test 1024');
  StartTicks := TickCount;

  FFT('foreward');

  Time := (TickCount - StartTicks) / 60;
		MessageStr := concat(MessageStr, '   FFT = ', Time:5:2, '\');
  ShowMessage(MessageStr);

  Dispose;  { FFT }

  MoveWindow(2000, 2000);
  StartTicks := TickCount;

  for i := 1 to 10 do
    Filter('smooth');

  Time := (TickCount - StartTicks) / 60;
		MessageStr := concat(MessageStr, 'Smooth = ', Time:5:2, '\');

  Dispose;  { smoothed }

  ShowMessage(MessageStr);

  SetBackground(0);
  SetForeground(255);
end;